package com.set;

import java.util.HashSet;
import java.util.LinkedHashSet;
import java.util.Set;

import com.teach.Student1;

public class LinkedHashset {
 public static void main(String[] args) {
		Set<Long> set1 = new HashSet<Long>();
		System.out.println("set1.add(1L):"+set1.add(1L));
		System.out.println("set1.add(2L):"+set1.add(3L));
		System.out.println("set1.add(3L):"+set1.add(2L));
		System.out.println("set1.add(2L):"+set1.add(2L));
		System.out.println("set1="+set1);
		
		Set<Long> set2 = new LinkedHashSet<Long>();
		System.out.println("set2.add(1L):"+set2.add(1L));
		System.out.println("set2.add(2L):"+set2.add(3L));
		System.out.println("set2.add(3L):"+set2.add(2L));
		System.out.println("set2.add(2L):"+set2.add(2L));
		System.out.println("set2="+set2);
		
}
}
